//导入模型
const { Continuous_Improvement } = require('../../models/Course outline/continuous_Improvement')

//查找
exports.Get_Continuous_Improvement = async (req, res) => {
  const { t_user_and_a_c_s_id } = req.query;

  try {
    const classes = await Continuous_Improvement.findAll({
      where: {
        t_user_and_a_c_s_id: t_user_and_a_c_s_id,
      },
    });

    if (classes.length === 0) {
      return res.json({
        'code': 203,
        'msg': '没有对应数据'
      });
    }

    res.json({
      'code': 200,
      'msg': '查询成功',
      'data': classes
    });
  } catch (error) {
    console.error('查询数据失败:', error);
    res.json({
      'code': 500,
      'msg': '查询失败'
    });
  }
};